import { IEvent } from '../type/IEvent';
import { BNode } from '../type/BNode';
// 自定义节点
export class CustomNode extends BNode implements IEvent {
    constructor(public call?: (blackboard?: any) => void) {
        super();
    }

    //节点事件完成
    done() {
        this.task.done();
    }

    onStart(blackboard?: any): void {
        this.call && this.call(blackboard);
    }
}
